package com.itxx.allTools.KeyCase.test3;

//递归求阶
public class Test {
    public static void main(String[] args) {
        int sum = getfactorial(5);
        System.out.println(sum);
    }

    public static int getfactorial(int i) {
        if (i == 1) {
            return 1;
        }
        return i * getfactorial(i - 1);
    }
}
